{template 'common/header'}
<div class="main">
	<form action="" method="post" class="form-horizontal form" enctype="multipart/form-data" id="form1"> 

		   
		<div class="panel panel-default">
			<div class="panel-heading"><strong>应用设置</strong></div>
			<div class="panel-body">

				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>取消关注减票</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline">
							<input type="radio" name="isopenjsps" value="1" {if $settings['isopenjsps'] == 1} checked="checked"{/if} />开启取消关注减票
						</label>
						<label class="radio-inline">
							<input type="radio" name="isopenjsps" value="0" {if $settings['isopenjsps'] == 0} checked="checked"{/if}  />不开启取消关注减票
						</label>
						<div class="help-block">是否开启取消关注减少用户票数，删除取消关注用户的相关信息如（评论、投票记录等)</div>
					</div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>秒显广告</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline">
							<input type="radio" name="ismiaoxian" value="1" {if $settings['ismiaoxian'] == 1} checked="checked"{/if} />开启秒显
						</label>
						<label class="radio-inline">
							<input type="radio" name="ismiaoxian" value="0" {if $settings['ismiaoxian'] == 0} checked="checked"{/if}  />不开启秒显
						</label>
						<div class="help-block">是否开启秒显广告</div>
					</div>
				</div>
				
				<div class="form-group">
					<label class="col-xs-12 col-sm-2 col-md-2  control-label">秒显时间</label>
					<div class="col-sm-3">
						<div class="input-group">
							<span class="input-group-addon">首页显示</span>
							<input type="text" name="mxtimes" id="mxtimes" class="form-control" value="{$settings['mxtimes']}" />
							
							<span class="input-group-addon">秒</span>
						</div>
					</div>
					<div class="help-block"></div>
				</div>
				<div class="form-group">
					<label class="col-xs-12 col-sm-2 col-md-2  control-label">秒显时间显示间隔</label>
					<div class="col-sm-3">
						<div class="input-group">
							<span class="input-group-addon">首页每隔</span>
							<input type="text" name="mxnexttime" id="mxnexttime" class="form-control" value="{$settings['mxnexttime']}" />
							
							<span class="input-group-addon">秒显示一次</span>
						</div>
						<div class="help-block">显示时间间隔，建议设置1800秒以上，其会会经过设定的秒数 ，在时间到了之后打开首页会再次显示广告</div>
					</div>
					
				</div>
			</div>
			<div class="panel-heading"><strong>Oauth网页授权（如果你的公众号没有oauth2接口权限，可以借用别人的接口权限使用。借用方法如下）</strong></div>
			<div class="panel-body">				
				<div class="form-group">
					<label class="col-xs-12 col-sm-3 col-md-2 control-label"><span style='color:red'>*</span>借用授权方式</label>
					<div class="col-sm-9 col-xs-12">
						<label class="radio-inline">
							<input type="radio" name="oauthtype" value="0" {if $settings['oauthtype'] == 0} checked="checked"{/if} onchange="oauthtypetwo()" />采用女神系统模块授权方式
						</label>
						<label class="radio-inline">
							<input type="radio" name="oauthtype" value="1" {if $settings['oauthtype'] == 1} checked="checked"{/if}  onchange="oauthtypeone()" />采用www.zheyitianShi.ComWZ本身借用授权方式
						</label>
						<div class="help-block">微信授权方式选择，一般默认请选择 女神系统模块授权方式。</div>
					</div>
				</div>
				
				<div id="oauthtypetwo" style="display:none">
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">AppId：</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" name="appid" value="{$settings['appid']}" placeholder="认证服务号不用填写，其他均需要填写借用认证服务号的 APPID" {if $wechats['level'] == 4}readonly="readonly"{/if}/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">AppSecret：</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" name="secret" value="{$settings['secret']}" placeholder="认证服务号不用填写，其他均需要填写借用认证服务号的 AppSecret" {if $wechats['level'] == 4}readonly="readonly"{/if}/>
						</div>
					</div>					
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
						<div class="col-sm-9">
						   
							<div class="help-block"><img src="../addons/fm_photosvote/template/images/appidappsecret.jpg"></div>
							
						</div>
					</div>
				</div>

				<div id="oauthtypetwos" style="display:none">
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">AppId：</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" name="appida" value="{$settings['appid']}" placeholder="认证服务号不用填写，其他均需要填写借用认证服务号的 APPID" {if $wechats['level'] == 4}readonly="readonly"{/if}/>
						</div>
					</div>
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label">AppSecret：</label>
						<div class="col-sm-9">
							<input type="text" class="form-control" name="secreta" value="{$settings['secret']}" placeholder="认证服务号不用填写，其他均需要填写借用认证服务号的 AppSecret" {if $wechats['level'] == 4}readonly="readonly"{/if}/>
						</div>
					</div>					
					<div class="form-group">
						<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
						<div class="col-sm-9">
						   
							<div class="help-block"><img src="../addons/fm_photosvote/template/images/appidappsecret.jpg"></div>
							
						</div>
					</div>
				</div>
				
				<div class="form-group">	
					<label class="col-xs-12 col-sm-1 col-md-2 control-label">借用说明</label>				
					<div class="col-sm-9">
						<div class="help-block">借用说明：设置借用高级认证号的OAuth2.0网页授权的回调域名为你公众号第三方平台的全域名。如：你的www.zheyitianShi.Com域名为：demo.012wz.com ，你必需让借用高级认证号设置OAuth2.0网页授权的回调域名为:demo.012wz.com</div>
						<div class="help-block">关于借用高级号，目前采用www.zheyitianShi.Com本身封装的方法，所以大家无需在这里设置 AppId  和 AppSecret，只需要在 功能选项里面 ， 借用oauth权限里设置要借用的公众号即可，一定要设置好，不然获取不到粉丝的信息等，会造成数据混乱或者其他未知的错误 。</div>
						
					</div>
				</div>
				<div class="form-group">	
					<label class="col-xs-12 col-sm-1 col-md-2 control-label">微信平台设置</label>				
					<div class="col-sm-9">
						<div class="help-block"><img src="../addons/fm_photosvote/template/images/mp.png" style="max-width:800px"></div>
					</div>
				</div>
				<div id="oauthtypeone" style="display:none">
					<div class="form-group">
					<label class="col-xs-6 col-sm-1 col-md-2 control-label">www.zheyitianShi.Com后台设置</label>
						<div class="col-sm-9">
						   
							<div class="help-block"><img src="../addons/fm_photosvote/template/images/jieyong.png" style="width:800px"></div>
							
						</div>
					</div>
				</div>
				
				
				<div class="form-group col-sm-12">
			        <input type="submit" name="submit" value="保存" class="btn btn-primary col-lg-1" />
			        <input type="hidden" name="token" value="{$_W['token']}" />
		        </div>
			</div>
	    </div>


	</form>	
</div>
<script type="text/javascript">
	{if $settings['oauthtype'] == 0}
		$('#oauthtypetwo').show();
	{/if}
	{if $settings['oauthtype'] == 1}
		$('#oauthtypeone').show();
	{/if}
	
	{if $settings['oauthtype'] == 2}
		$('#oauthtypetwos').show();
	{/if}
	
	function oauthtypeone(){
		 $('#oauthtypeone').show();
		 $('#oauthtypetwo').hide();
		 $('#oauthtypetwos').hide();
	}
	function oauthtypetwo(){
		 $('#oauthtypeone').hide();
		 $('#oauthtypetwo').show();
		 $('#oauthtypetwos').hide();
	}
	function oauthtypetwos(){
		 $('#oauthtypeone').hide();
		 $('#oauthtypetwo').hide();
		 $('#oauthtypetwos').show();
	}
</script>
{template 'common/footer'}
